/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.pretorius.programs.program07.impl;

import za.ac.cput.pretorius.programs.program07.CaseChanger;

/**
 *
 * @author griddy
 */
public class CaseChangerImpl implements CaseChanger{

    @Override
    public String changeWordCase(String str) {
        String newStr = "";
        for(int i = 0 ; i < str.length() ; i++)
        {
            if(str.charAt(i)>64 && str.charAt(i)< 91 )
                newStr +=( (char)(str.charAt(i)+ 32)+ "");
            else if(str.charAt(i)>96 && str.charAt(i)< 132 )
                newStr += ( (char)(str.charAt(i)- 32) + "");
            else
                newStr += ( (char)(str.charAt(i)) + "");
        }
       
        return newStr;
    }
    
    
    
}
